#include<stdio.h>
#include<string.h>
#include<iostream>
using namespace std;
const int MaxLength=20;
int used[MaxLength][MaxLength][MaxLength];
int ans[MaxLength];
int A,B,C;
void DFS(int a,int b,int c){
 if(used[a][b][c])return;
 used[a][b][c]=true;
 if(a==0&&!ans[c])
  ans[c]=true;
 // c-->a
 if(c>=A-a)DFS(A,b,c-A+a);
 else DFS(a+c,b,0);
 //c-->b
 if(c>=B-b)DFS(a,B,c-B+b);
 else DFS(a,b+c,0);
 //b-->c
 DFS(a,0,C-a);
 //b-->a
 if(b>=A-a)DFS(A,b-A+a,c);
 else DFS(a+b,0,c);
 //a-->c
 DFS(0,b,a+c);
 //a-->b
 if(a>=B-b)DFS(a-B+b,B,c);
 else DFS(0,b+a,c);
}
void Print(){
 bool work=false;
 for(int i=0;i<=C;i++)
  if(ans[i]){
   if(!work){
   printf("%d",i);
   work=true;
  }
  else printf(" %d",i);
  }
  printf("\n");
}
void Read_Solve(){
 scanf("%d%d%d",&A,&B,&C);
 memset(used,false,sizeof(used));
 memset(ans,false,sizeof(ans));
 DFS(0,0,C);
 Print();
}
int main(){
 //freopen("C:\\Users\\loveKid\\Desktop\\data.txt","r",stdin);
 //freopen("C:\\Users\\loveKid\\Desktop\\dataOut.txt","w",stdout);
 Read_Solve();
 system("pause");
 return 0;
}
